import VuexORM from "@vuex-orm/core";
import Account from "./models/Account";
import accounts from "./models/accounts";
import Address from "./models/Address";
import addresses from "./models/addresses";
import File from "./models/File";
import files from "./models/files";
import Permission from "./models/Permission";
import permissions from "./models/permissions";
import PermissionRole from "./models/PermissionRole";
import permissionRoles from "./models/permissionRoles";
import Privacy from "./models/Privacy";
import privacies from "./models/privacies";
import Property from "./models/Property";
import properties from "./models/properties";
import Role from "./models/Role";
import roles from "./models/roles";
import RoleUser from "./models/RoleUser";
import roleUsers from "./models/roleUsers";
import User from "./models/User";
import users from "./models/users";

// Create new instance of Database.
const database = new VuexORM.Database();

// Register Model and Module. The first argument is the Model, and second
// is the Module.
database.register(Account, accounts);
database.register(Address, addresses);
database.register(File, files);
database.register(Permission, permissions);
database.register(PermissionRole, permissionRoles);
database.register(Privacy, privacies);
database.register(Property, properties);
database.register(Role, roles);
database.register(RoleUser, roleUsers);
database.register(User, users);

export default database;
